<?php
namespace app\shell;


use share\console\CConsole;
use share\console\CLIRunner;
use share\exception\ApiException;
use share\exception\Errno;
use share\service\NotifyDingTalkService;


class CNotify extends CLIRunner{

    public function test_raw_action(){ 
        NotifyDingTalkService::pushText("this is a test message!");
    }

    public function test_exception_action(){
        throw new ApiException("just for test",Errno::COMMON_FREQUENT_REQUESTS_WITH_ERRORS);
    }

    public function test_push_text_mq_action(){
        NotifyDingTalkService::pushTextByAMQP("this is a test message!");
    }
}